package cn.com.dhcc.app.pub.core.job;

import cn.com.dhcc.app.core.exception.ServiceException;
import cn.com.dhcc.app.core.service.Log;
import cn.com.dhcc.app.pub.CM;
import cn.com.dhcc.ddi.task.service.SettlementService;
import org.apache.log4j.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * @日期：2017/4/21 15:22
 * @作者：张洪涛
 * @版权所有：东华软件
 * @版本：1.0
 */
public class SettlementTaskJob implements Job {
    private static Logger logger = Log.getLogger(Log.LOGTYPE.DDI);
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        logger.info("开始执行生成结算任务...");
        SettlementService settService = CM.getBean(SettlementService.class);
        try {
            settService.settlementStrucTasks();
        } catch (ServiceException e) {
            logger.error("生成结算任务异常",e);
        }
    }
}
